<?php

class NewsPeer extends BaseNewsPeer
{
	public static function getActiveNews()
	{
		$criteria = new Criteria();

		$criteria->add(self::ARCHIVE,0);

		$criteria->addDescendingOrderByColumn(self::STICKY);
		$criteria->addDescendingOrderByColumn(self::CREATED_AT);

		return self::doSelect($criteria);
	}

	public static function getArchiveNews()
	{
		$criteria = new Criteria();

		$criteria->add(self::ARCHIVE,1);

		$criteria->addDescendingOrderByColumn(self::STICKY);
		$criteria->addDescendingOrderByColumn(self::CREATED_AT);

		return self::doSelect($criteria);
	}

}
